<?php
session_start();
if (!empty($_SESSION["tipousuario"])){
require_once("../templates/comun.php");

$conexion=Obtener_Conexion();

$sql="  SELECT fecha_v as fecha, a.nombre as agente, lth.numcte, c.nombre as nombrecliente, a.agente as id_agente, lth.hora_cita
	FROM lth_calendario lth
		INNER JOIN cxcagentes a on (lth.agente = a.agente)
		INNER JOIN cxcclientes c on (lth.numcte = c.numcte)
	where 
		lth.fecha_v = '".$fecha."' and lth.agente=".$_SESSION["cveagente"]."
  ";

$dia = intval(substr($fecha,8,2));
$mes = intval(substr($fecha,5,2));
$anio = substr($fecha,0,4);
$sql=" 	SELECT * 

	FROM 
	  lth_visita 
    ";

//$res=pg_query($conexion,$sql)  or die ("Error $sql");
//$contador = pg_num_rows($res);

?>	
	<span id="contenido_principal_evento">
	<style>
	  .fc-event-vert {
	    min-height: 55px;
	  }
	  .fc-agenda-slots td div {
	    height: 55px;
	  }
	  #calendar_day {
	    width: 600px;
	  }

	  #tabla_evento {
	    font-size: 12px;
	    font-family: arial;
	  }
	  #tabla_evento input,select{
	    font-size: 12px;
	    font-family: arial;
	  }
	</style>
	<script>

		$(document).ready(function() {
		 

		
		});
	</script>
	<table align="center" cellpadding="0" cellspacing="0" width="90%">
	<tr>
	  <td>
	    <div id="formulario" align="center">
	      Pasos para una venta Exitosa
	      <table id="tabla_evento">
	      <tr>
		  <td>1.- Revisi&oacute;n de compromisos :</td>
		  <td ><input type="radio" value="Y" name="q1"> &nbsp;SI</td>
		  <td ><input type="radio" value="N" name="q1"> &nbsp;NO</td>
		
	      </tr>
	      <tr>
		  <td>2.- Revisi&oacute;n cartera :</td>
		  <td ><input type="radio" value="Y" name="q2"> &nbsp;SI</td>
		  <td ><input type="radio" value="N" name="q2"> &nbsp;NO</td>
		
	      </tr>
	      <tr>
		  <td>3.- Revisi&oacute;n de cobranza :</td>
		  <td ><input type="radio" value="Y" name="q3"> &nbsp;SI</td>
		  <td ><input type="radio" value="N" name="q3"> &nbsp;NO</td>
		
	      </tr>
	      <tr>
		  <td>4.- Acomodo y limpieza :</td>
		  <td ><input type="radio" value="Y" name="q4"> &nbsp;SI</td>
		  <td ><input type="radio" value="N" name="q4"> &nbsp;NO</td>
		
	      </tr>
	      <tr>
		  <td>5.- Inventario f&iacute;sico :</td>
		  <td ><input type="radio" value="Y" name="q5"> &nbsp;SI</td>
		  <td ><input type="radio" value="N" name="q5"> &nbsp;NO</td>
		
	      </tr>
	      <tr>
		  <td>6.- Revisi&oacute;n de vigencias :</td>
		  <td ><input type="radio" value="Y" name="q6"> &nbsp;SI</td>
		  <td ><input type="radio" value="N" name="q6"> &nbsp;NO</td>
		
	      </tr>
	      <tr>
		  <td>7.- Ajustes y garantias :</td>
		  <td ><input type="radio" value="Y" name="q7"> &nbsp;SI</td>
		  <td ><input type="radio" value="N" name="q7"> &nbsp;NO</td>
		
	      </tr>
	      <tr>
		  <td>8.- Cascos :</td>
		  <td ><input type="radio" value="Y" name="q8"> &nbsp;SI</td>
		  <td ><input type="radio" value="N" name="q8"> &nbsp;NO</td>
		
	      </tr>
	      <tr>
		  <td>9.- Material pop :</td>
		  <td ><input type="radio" value="Y" name="q9"> &nbsp;SI</td>
		  <td ><input type="radio" value="N" name="q9"> &nbsp;NO</td>
		
	      </tr>
	      <tr>
		  <td>10.- Nuevos compromisos :</td>
		  <td ><input type="radio" value="Y" name="q10"> &nbsp;SI</td>
		  <td ><input type="radio" value="N" name="q10"> &nbsp;NO</td>
		
	      </tr>
	      <tr>
		  <td colspan="3"><textarea cols="55" rows="5" readonly></textarea></td>
	      </tr>
	       <tr>
		  <td colspan="3">
		    Compromiso:	  
		    <br>	      
		    <textarea cols="55" rows="5" id="readonlycomentario"></textarea>
		  </td>
	      </tr>
	      <tr align="center">
		  <td align="center"><input type="button" onclick="fnCancelar_Editar_Evento(); return false;" value=" Regresar " /></td>
	      </tr>
	      </table>
	      <input type="hidden" value="" id="id_evento_seleccionado" />
	      <input type="hidden" value="" id="id_cliente_seleccionado" />
	      <input type="hidden" value="" id="id_agente_seleccionado" />
	      <input type="hidden" value="<?php echo $fecha; ?>" id="id_fecha_seleccionado" />
	    </div>
	  </td>
	</tr>
	</table>
	</span>
	
<?php }else{ ?>
Termino la sesion
<?php } ?>